import axios from "@/util/request"

export function findAllTag() {
    return axios({
        url: 'tags',
        method: 'GET'
    })
}

export function saveTag(form) {
    return axios({
        url: 'tag',
        method: 'POST',
        data: {
            ...form
        }
    })
}

export function updateTag(form) {
    return axios({
        url: 'tag',
        method: 'PUT',
        data: {
            ...form
        }
    })
}

export function deleteTagById(id) {
    return axios({
        url: `tag?id=${id}`,
        method: 'DELETE',
    })
}
